package com.sdonkey.score.bean;

import org.apache.commons.lang.StringUtils;

import java.text.DateFormat;
import java.text.SimpleDateFormat;

public class UpdatePlaceAdForm {
	
	private String adId;
	
	private String releaseMount;

	private String deliveryPrice;
	
	private String beginTime;
	
	private String endTime;
	
	private String  mbPrice;
	
	private String  pcPrice;
	
	private String  padPrice;
	
	private String  tvPrice;
	
	//渠道信息:渠道ID_投放总额_单价|渠道ID_投放总额_单价
	private String  channelInfo;
	
	//地区信息:all(part)|华北，北南｜北京，广�?	private String  areaInfo;
	
	//目标人群：�?别｜婚否｜有无孩子｜是否有房｜是否有车｜年龄｜学历｜月收入｜家庭收入
	private  String targetInfo; 
	
	//广告分类�?	private String adTag;
	
	private String hobbyTag;
	
	
	DateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");

	private String areaInfo;

	private String adTag; 
	public String getAdId() {
		return adId;
	}

     
	public void setAdId(String adId) {
		this.adId = adId;
	}

	public String getReleaseMount() {
		return releaseMount;
	}

	public void setReleaseMount(String releaseMount) {
		this.releaseMount = releaseMount;
	}

	public String getDeliveryPrice() {
		return deliveryPrice;
	}

	public void setDeliveryPrice(String deliveryPrice) {
		this.deliveryPrice = deliveryPrice;
	}

	public String getBeginTime() {
		return df.format(beginTime).substring(10) ;
	}

	public void setBeginTime(String beginTime) {
		this.beginTime = beginTime;
	}

	public String getEndTime() {
		return df.format(endTime).substring(10) ;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public String getMbPrice() {
		return mbPrice;
	}

	public void setMbPrice(String mbPrice) {
		this.mbPrice = mbPrice;
	}

	public String getPcPrice() {
		return pcPrice;
	}

	public void setPcPrice(String pcPrice) {
		this.pcPrice = pcPrice;
	}

	public String getPadPrice() {
		return padPrice;
	}

	public void setPadPrice(String padPrice) {
		this.padPrice = padPrice;
	}

	public String getTvPrice() {
		return tvPrice;
	}

	public void setTvPrice(String tvPrice) {
		this.tvPrice = tvPrice;
	}

	public String getChannelInfo() {
		return channelInfo;
	}

	public void setChannelInfo(String channelInfo) {
		this.channelInfo = channelInfo;
	}

	public String getAreaInfo() {
		String areaInfo = "";
		return areaInfo ;
	}

	public void setAreaInfo(String areaInfo) {
		this.areaInfo = areaInfo;
	}

	public String getTargetInfo() {
		return targetInfo;
	}

	public void setTargetInfo(String targetInfo) {
		this.targetInfo = targetInfo;
	}

	public String getAdTag() {
		return adTag;
	}

	public void setAdTag(String adTag) {
		this.adTag = adTag;
	}

	public String getHobbyTag() {
		return hobbyTag;
	}

	public void setHobbyTag(String hobbyTag) {
		this.hobbyTag = hobbyTag;
	}
	
	public String getPrices(){
		String prices="";
		prices = StringUtils.trimToNull(this.mbPrice)+"|"+ StringUtils.trimToNull(this.pcPrice)+"|"+ StringUtils.trimToNull(this.padPrice)+"|"+ StringUtils.trimToNull(this.tvPrice);
		return prices;
	}
	
	public String getCarrier(){
        String carriers = "";
        if(StringUtils.isNotBlank(this.mbPrice)){
        	carriers +=  "|"+"MOBLE";
        }
        
        if(StringUtils.isNotBlank(this.pcPrice)){
        	carriers =     "PC";
        }
        
        if(StringUtils.isNotBlank(this.padPrice)){
        	carriers =     "PAD";
        }
        
        if(StringUtils.isNotBlank(this.tvPrice)){
        	carriers =     "TV";
        }
		return carriers;
	}
}
